#define _CRT_SECURE_NO_WARNINGS 1
//5 6 8 6 9 1 6 1 2 4 9 1 9 8 2 3 6 4 7 7 5 9 
// 5 0 3 8 7 5 8 1 5 8 6 1 8 3 0 3 7 9 2 7 0 5
//  8 8 5 7 0 9 9 1 9 4 4 6 8 6 3 3 8 5 1 6 3 4 
// 6 7 0 7 8 2 7 6 8 9 5 6 5 6 1 4 0 1 0 0 9 4 8 0 9 1 2 8 5 0 2 5 3 3

#include<stdio.h>
int shi(char* zxl, char* fxl)
{
	if (*zxl == '\0')
	{
		return 1;
	}
	if (*fxl == '\0')
	{
		return 0;
	}
	if (*zxl == *fxl)
	{
		return shi(zxl + 1, fxl + 1);
	}
	return shi(zxl, fxl + 1);

}
int main()
{
	int count = 0;
	char riqi[5] = { 0 };
	int month = 0;
	for (month = 1; month <= 12; month++)
	{
		int day[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
		int ri;
		for (ri = 1; ri <= day[month]; ri++)
		{
			sprintf(riqi, "%02d", month);
			sprintf(riqi+2 , "%02d", ri);

			//	count += shi(riqi, "3 8 5 1 6 3 4 6 7 0 7 8 2 7 6 8 9 5 6 5 6 1 4 0 1 0 0 9 4 8 0 9 1 2 8 5 0 2 5 3 3");
			if (shi(riqi, "3 8 5 1 6 3 4 6 7 0 7 8 2 7 6 8 9 5 6 5 6 1 4 0 1 0 0 9 4 8 0 9 1 2 8 5 0 2 5 3 3"))
			{
				puts(riqi);
				count++;
			}
		}

	}
	printf("%d", count);
	return 0;
}